﻿using System;
using System.Collections.Generic;

namespace NetCoreCMS.Models
{
    /// <summary>
    /// 订单表
    /// </summary>    
    public partial class Orders:BaseModel
    {
        /// <summary>
        /// 每个订单只能下单一个商家
        /// </summary>
        public int shop_id { get; set; } = 0;
        /// <summary>
        /// 订单号
        /// </summary>
        public string order_no { get; set; }
        /// <summary>
        /// 交易号担保支付用到
        /// </summary>
        public string trade_no { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public int user_id { get; set; } = 0;
        /// <summary>
        /// 用户名
        /// </summary>
        public string user_name { get; set; }
        /// <summary>
        /// 支付方式
        /// </summary>
        public int payment_id { get; set; } = 0;
        /// <summary>
        /// 支付手续费
        /// </summary>
        public decimal payment_fee { get; set; }
        /// <summary>
        /// 支付状态0未支付1待支付2已支付
        /// </summary>
        public int payment_status { get; set; } = 0;
        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime? payment_time { get; set; }
        /// <summary>
        /// 快递ID
        /// </summary>
        public int express_id { get; set; } = 0;
        /// <summary>
        /// 快递单号
        /// </summary>
        public string express_no { get; set; }
        /// <summary>
        /// 物流费用
        /// </summary>
        public decimal express_fee { get; set; }
        /// <summary>
        /// 发货状态1未发货2已发货
        /// </summary>
        public int express_status { get; set; } = 0;
        /// <summary>
        /// 发货时间
        /// </summary>
        public DateTime? express_time { get; set; }
        /// <summary>
        /// 收货人姓名
        /// </summary>
        public string accept_name { get; set; }
        /// <summary>
        /// 邮政编码
        /// </summary>
        public string post_code { get; set; }
        /// <summary>
        /// 联系电话
        /// </summary>
        public string telphone { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        public string mobile { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        public string email { get; set; }
        /// <summary>
        /// 所属省市区
        /// </summary>
        public string area { get; set; }
        /// <summary>
        /// 收货地址
        /// </summary>
        public string address { get; set; }
        /// <summary>
        /// 订单留言
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 订单备注
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 是否索要发票
        /// </summary>
        public int is_invoice { get; set; } = 0;
        /// <summary>
        /// 发票抬头
        /// </summary>
        public string invoice_title { get; set; }
        /// <summary>
        /// 税金
        /// </summary>
        public decimal invoice_taxes { get; set; } = 0;
        /// <summary>
        /// 应付商品总金额
        /// </summary>
        public decimal payable_amount { get; set; } = 0;
        /// <summary>
        /// 实付商品总金额
        /// </summary>
        public decimal real_amount { get; set; } = 0;
        /// <summary>
        /// 订单总金额
        /// </summary>
        public decimal order_amount { get; set; } = 0;
        /// <summary>
        /// 产生了多少PV
        /// </summary>
        public decimal pv_amount { get; set; } = 0;
        /// <summary>
        /// 积分,正数赠送|负数消费
        /// </summary>
        public int point { get; set; } = 0;
        /// <summary>
        /// 订单状态1生成订单,2确认订单,3完成订单,4取消订单,5作废订单
        /// </summary>
        public int status { get; set; } = 0;
        /// <summary>
        /// 确认时间
        /// </summary>
        public DateTime? confirm_time { get; set; }
        /// <summary>
        /// 订单完成时间
        /// </summary>
        public DateTime? complete_time { get; set; }
        /// <summary>
        /// 商品列表
        /// </summary>
        public List<Order_goods> order_goods { get; set; }
    }
}